<?php
// +----------------------------------------------------------------------
// | Jqcms [ Avenue to Jane ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://jqcms.net All rights reserved.
// +----------------------------------------------------------------------
// | Author: hyacinth <845077398@qq.com>
// +----------------------------------------------------------------------
namespace Admin\Controller;
use Common\Controller\BaseController;

class ConfigController extends BaseController {
    
    //设置网站基本信息
    public function index(){
       
        $conf = D('Config');
        if(IS_POST){
            
            if($conf->webconfig()){
                $this->success('设置成功!');
            }else{
                $this->success('设置出错!');
            }
            
        }else{
            $data = $conf->getField('name,value');
            $picarr = explode(',', $data['web_picsize']);
            $assign['data'] = $data;
            $assign['themedir'] = $conf->theme();
            $assign['picarr'] = $picarr;
            $this->assign($assign);
            $this->display();
        } 
        
    }

  
    
}